package com.violationlist.model;

import java.util.List;

public class ViolationListDAO_JDBC_Demo {
	public static void main(String[] args) {
		ViolationListDAO_JDBC dao = new ViolationListDAO_JDBC();
		
		// 
//		ViolationListVO  vl = new ViolationListVO();
//		vl.setMember_id("1000000001");
//		vl.setViolation_id(14);
//		dao.insert(vl);
		
		//
//		List<ViolationListVO> list = dao.getAll("1000000001");
//		for (ViolationListVO v : list){
//			StringBuilder sb = new StringBuilder();
//			sb.append(v.getViolation_id() + " | ");
//			sb.append(v.getViol_date());
//			System.out.println(sb);
//		}
		
//		ViolationListVO v1 = new ViolationListVO();
//		v1.setMember_id("1000000007");
//		v1.setViolation_id(14);
//		dao.insert(v1);
		
//		List<ViolationListVO> list = dao.getAllViol(0);
//		for (ViolationListVO vlVO : list) {
//			System.out.println(vlVO.getMember_id());
//			System.out.println(vlVO.getViolation_id());
//			System.out.println(vlVO.getViol_date());
//		}
		
//		dao.updateStatus(list);
		
//		int count = dao.getByMemId("1000000001");
//		System.out.println(count);
		
//		List<ViolationListVO> listFrom = dao.getCount(14);
//		for (ViolationListVO vlVO : listFrom) {
//			System.out.print(vlVO.getViolation_id() + " | ");
//			System.out.print(vlVO.getMember_id() + " | ");
//			System.out.println(vlVO.getViol_date());
//		}
		
		
//		for (ViolationByMem vbm : listFrom) {
//			System.out.print(vbm.getCount() + " | ");
//			System.out.println(vbm.getMember_id());
//		}
		
//		List<ViolationListVO> list = dao.getFromMem(listFrom);
//		for (ViolationListVO vlVO : list) {
//			System.out.print(vlVO.getViolation_id() + " | ");
//			System.out.print(vlVO.getMember_id() + " | ");
//			System.out.println(vlVO.getViol_date());
//		}
		
//		List<ViolationListVO> list = dao.getCount(14);		
//		dao.updateStatus(list, 21, 7);
		
//		List<ViolationListVO> list = dao.getOverTime(14);
//		List<ViolationListVO> list = dao.getAll(14);
//		for (ViolationListVO vlVO : list) {
//			System.out.println(vlVO.getViol_date());
//		}
	}
}
